package com.PortalAsteroidjava;

import java.awt.*;
import java.awt.event.*;

import com.badlogic.gdx.Application;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.*;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.input.*;
import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.graphics.g2d.*;

import java.util.ArrayList;

public class GameModel {
	
	AsteroidsPanel gameControl = new AsteroidsPanel();
	
	//Input
	private static final int ROTATE_CLOCKWISE = KeyEvent.VK_LEFT;
    private static final int ROTATE_ANTICLOCKWISE = KeyEvent.VK_RIGHT;
    private static final int THRUST = KeyEvent.VK_UP;
    private static final int FIRE = KeyEvent.VK_DOWN;

	
	//Make an array list for all of the sprites (except player
	//who will only have one sprite at any time)
	public static ArrayList<Sprite> sprites;
	
	public Player player;
	
	public GameModel () {
		Application app = Gdx.app;
		sprites = new ArrayList< Sprite >();
		player = new Player(0,0);
		sprites.add(player);
		
		//For now, we'll just put asteroids at
		//set locations rather than randomizing their 
		//spawn points.
		Asteroid asteroid1 = new Asteroid(100,100);
		Asteroid asteroid2 = new Asteroid(50, 300);
		Asteroid asteroid3 = new Asteroid(200, 50);
		sprites.add(asteroid1);
		sprites.add(asteroid2);
		sprites.add(asteroid3);
		
	}
	
    public void movePlayer(int x, int y)
    {
    	player.move(x,y);
    }
	
	public ArrayList<Sprite> getSprites()
	{
		return sprites;
	}

}
